package edu.whut.mall.portal.filter;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.Filter;
import ch.qos.logback.core.spi.FilterReply;

/**
 * @author Wayne
 * @projectName d9lab-mall
 * @description: 支付信息过滤器
 * @date 2020/10/19 11:27
 */
public class PayLogBackFilter extends Filter<ILoggingEvent> {

    @Override
    public FilterReply decide(ILoggingEvent event) {
        if (event.getFormattedMessage().contains("pay_info")) {
            return FilterReply.ACCEPT;
        } else {
            return FilterReply.DENY;
        }
    }
}
